package cn.sylinx.common.ext;

import cn.sylinx.common.lang.StringUtil;

public final class UUID {

	public static String generate(String type){
		String uuid = java.util.UUID.randomUUID().toString().replaceAll("-", "") + String.valueOf(System.currentTimeMillis());
		return StringUtil.isBlank(type) ? uuid : KeysHelper.createKVSKey(type, uuid);
	}
	
	public static String generate(){
		return generate(null);
	}
}
